package practice.Day17;

import java.util.Scanner;

/**
 * @Author quan
 * @Description 某字符出现的次数:不区分大小写
 * @Date 2023/5/26 10:28
 */
public class Num2_CharNum {
    public static void main(String[] args) {
//        String str = "ABCabc";
//        char c = 'A';
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String str1 = sc.nextLine();
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            String str2 = String.valueOf(str.charAt(i));
            if(str1.equalsIgnoreCase(str2)){
                count++;
            }
        }
        System.out.println(count);
    }
}
